﻿#///////////////////////////////////////////////////////////////////////////////
#//
#//  This file is part of MathLib.NET.
#//
#//  This library is free software; you can redistribute it and/or
#//  modify it under the terms of the GNU Lesser General Public
#//  License as published by the Free Software Foundation; either
#//  version 2.1 of the License, or (at your option) any later version.
#//  
#//  This library is distributed in the hope that it will be useful,
#//  but WITHOUT ANY WARRANTY; without even the implied warranty of
#//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#//  Lesser General Public License for more details.
#//  
#//  You should have received a copy of the GNU Lesser General Public
#//  License along with this library;  If not, see 
#//  <http://www.gnu.org/licenses/>.
#//
#///////////////////////////////////////////////////////////////////////////////

from ILNumerics import *
from ILNumerics.BuiltInFunctions import *
from MathLib import *

abs = ILMath.abs
acsc = MLMath.acsc
acsch = MLMath.acsch
acos = ILMath.acos
acosc = ILMath.acosc
acosh = MLMath.acosh
acot = MLMath.acot
acoth = MLMath.acoth
add = ILMath.add
all = ILMath.all
any = ILMath.any
array = ILMath.array
asec = MLMath.asec
asech = MLMath.asech
asin = ILMath.asin
asinc = ILMath.asinc
asinh = MLMath.asinh
atan = ILMath.atan
atan2 = ILMath.atan2
atanh = MLMath.atanh
blkdiag = MLMath.blkdiag
cat = MLMath.cat
complex = ILMath.ccomplex
ceil = ILMath.ceil
chol = ILMath.chol
conj = ILMath.conj
convert = ILMath.convert
cos = ILMath.cos
cosh = ILMath.cosh
cot = MLMath.cot
coth = MLMath.coth
counter = ILMath.counter
csc = MLMath.csc
csch = MLMath.csch
det = ILMath.det
diag = ILMath.diag
diff = ILMath.diff
divide = ILMath.divide
eig = ILMath.eig
eigSymm = ILMath.eigSymm
empty = ILMath.empty
eq = ILMath.eq
exp = ILMath.exp
expm1 = MLMath.expm1
eye = MLMath.eye
factor = MLMath.factor
factorial = MLMath.factorial
fft = MLMath.fft
fft2 = MLMath.fft2
fftn = ILMath.fftn
find = ILMath.find
fix = ILMath.fix
floor = MLMath.floor
gcd = MLMath.gcd
ge = ILMath.ge
gt = ILMath.gt
horzcat = ILMath.horzcat
idivide = MLMath.idivide
ifft = MLMath.ifft
ifft2 = ILMath.ifft2
ifft2sym = ILMath.ifft2sym
ifftn = ILMath.ifftn
ifftnsym = ILMath.ifftnsym
ifftsym = ILMath.ifftsym
isprime = MLMath.isprime
imag = ILMath.imag
ind2sub = ILMath.ind2sub
inv = MLMath.inv
isempty = MLMath.isempty
isequal = ILMath.isequal
isequalwithequalnans = ILMath.isequalwithequalnans
isfinite = ILMath.isfinite
isfloat = MLMath.isfloat
ishermitian = ILMath.ishermitian
ishesslow = ILMath.ishesslow
ishessup = ILMath.ishessup
isinf = ILMath.isinf
isinteger = MLMath.isinteger
islogical = MLMath.islogical
isnan = ILMath.isnan
isneginf = ILMath.isneginf
isnumeric = MLMath.isnumeric
isposinf = ILMath.isposinf
isreal = MLMath.isreal
istrilow = ILMath.istrilow
istriup = ILMath.istriup
lcm = MLMath.lcm
load = ILMath.load
le = ILMath.le
length = ILMath.length
linsolve = ILMath.linsolve
linspace = ILMath.linspace
log = ILMath.log
log10 = ILMath.log10
log10c = ILMath.log10c
logc = ILMath.logc
logspace = ILMath.logspace
log1p = MLMath.log1p
log2 = MLMath.log2
lt = ILMath.lt
lu = ILMath.lu
magic = MLMath.magic
max = ILMath.max
maxall = ILMath.maxall
mean = ILMath.mean
meshgrid = ILMath.meshgrid
mgrid = ILMath.mgrid
min = ILMath.min
minall = ILMath.minall
mod = MLMath.mod
multiply = ArrayHelper.multiply
multiplyElem = ILMath.multiplyElem
nchoosek = MLMath.nchoosek
ndims = ILMath.ndims
neq = ILMath.neq
nextpow2 = MLMath.nextpow2
norm = ILMath.norm
numel = ILMath.numel
ones = MLMath.ones
perms = MLMath.perms
pinv = ILMath.pinv
polyfit = ILMath.polyfit
pow = ILMath.pow
pow2 = MLMath.pow2
powc = ILMath.powc
power = MLMath.power
primes = MLMath.primes
dbgtrace = Utils.trace
prod = ILMath.prod
qr = ILMath.qr
rand = ILMath.rand
randn = ILMath.randn
rank = ILMath.rank
rat = MLMath.rat
rats = MLMath.rats
real = ILMath.real
real2complex = ILMath.real2complex
real2fcomplex = ILMath.real2fcomplex
reallog = ILMath.log
realpow = MLMath.power
realsqrt = ILMath.sqrt
rem = MLMath.rem
repmat = MLMath.repmat
reshape = MLMath.reshape
round = ILMath.round
sec = MLMath.sec
sech = MLMath.sech
shiftdim = MLMath.shiftdim
sign = ILMath.sign
sin = ILMath.sin
single = ILMath.single
sinh = ILMath.sinh
size = ILMath.size
sort = ILMath.sort
sqrt = ILMath.sqrt
sqrtc = ILMath.sqrtc
sub2ind = ILMath.sub2ind
subtract = ILMath.subtract
sum = ILMath.sum
sumall = ILMath.sumall
svd = ILMath.svd
tan = ILMath.tan
tanh = ILMath.tanh
tobyte = ILMath.tobyte
tochar = ILMath.tochar
tocomplex = ILMath.tocomplex
todouble = ILMath.todouble
tofcomplex = ILMath.tofcomplex
toint16 = ILMath.toint16
toint32 = ILMath.toint32
toint64 = ILMath.toint64
tological = ILMath.tological
tosingle = ILMath.tosingle
touint16 = ILMath.touint16
touint32 = ILMath.touint32
touint64 = ILMath.touint64
trace = ILMath.trace
tril = ILMath.tril
triu = ILMath.triu
unwrap = MLMath.unwrap
vector = ILMath.vector
vertcat = ILMath.vertcat
zeros = MLMath.zeros

pi = MLMath.pi
NaN = MLMath.NaN
Inf = MLMath.Inf
eps = MLMath.eps
i = complex(0., 1.)
j = complex(0., 1.)
intmax = MLMath.intmax
intmin = MLMath.intmin
realmax = MLMath.realmax
realmin = MLMath.realmin

def acosd(arg):
    return acos(arg) * (180. / pi)

def acotd(arg):
    return acot(arg) * (180. / pi)

def acscd(arg):
    return acsc(arg) * (180. / pi)

def asecd(arg):
    return asec(arg) * (180. / pi)

def asind(arg):
    return asin(arg) * (180. / pi)

def atand(arg):
    return atan(arg) * (180. / pi)

def cosd(arg):
    return cos(arg * (pi / 180.))

def cotd(arg):
    return cot(arg * (pi / 180.))

def cscd(arg):
    return csc(arg * (pi / 180.))

def secd(arg):
    return sec(arg * (pi / 180.))

def sind(arg):
    return sin(arg * (pi / 180.))

def tand(arg):
    return tan(arg * (pi / 180.))

def nthroot(arg, n):
    return pow(arg, 1. / n)

def angle(arg):
    return atan(imag(arg) / real(arg))

def iscolumn(arg):
    return arg.IsColumnVector

def isrow(arg):
    return arg.IsRowVector

def isscalar(arg):
    return arg.IsScalar

def isvector(arg):
    return arg.IsVector

def ismatrix(arg):
    return arg.IsMatrix

def disp(arg):
	return dbgtrace("{0}", arg)

display = disp
